﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DLULearningNetworkModel;

namespace DLULearningNetwork.ViewModels
{
    public class LeftMainMenuItem
    {
        public string Name { get; set; }
        public string DisplayedName { get; set; }
        public string Href { get; set; }
        public List<LeftMainMenuItem> SubMenu { get; set; }
        public LeftMainMenuItem()
        {
            SubMenu = new List<LeftMainMenuItem>();
        }
        public LeftMainMenuItem(string name, string displayedName, string href,List<LeftMainMenuItem> submenu)
        {
            Name = name;
            DisplayedName = displayedName;
            Href = href;
            SubMenu = submenu;
        }
        public enum EnumLeftMenuItem { 
            HomePage,
            Personal,
            Personal_EditProfile,
            Personal_EditPrivacy,
            Personal_ChangePassword,
            Personal_ChangeAvatar,
            FriendShip, 
            FriendShip_MyFriend,
            FriendShip_FriendRequest,
            FriendShip_Search,
            Courses,
            Courses_MyCourses,
            Courses_Attendance,
            Courses_Search

        }
        public static List<LeftMainMenuItem> CreateMenu(){
            List<LeftMainMenuItem> menus = new List<LeftMainMenuItem>();

            LeftMainMenuItem homePage = new LeftMainMenuItem("HomePage", "Trang chủ", @"/Home/HomePage", null);
            menus.Add(homePage);
            
            LeftMainMenuItem personal = new LeftMainMenuItem("Personal", "Cá nhân", @"/Profile/Edit", new List<LeftMainMenuItem>());
            personal.SubMenu.Add(new LeftMainMenuItem("Personal_EditProfile", "Sửa thông tin cá nhân", @"/Profile/Edit", null));
            personal.SubMenu.Add(new LeftMainMenuItem("Personal_EditPrivacy", "Sửa riêng tư", @"/Privacy/", null));
            personal.SubMenu.Add(new LeftMainMenuItem("Personal_ChangePassword", "Đổi mật khẩu", @"/Account/ChangePassword", null));
            personal.SubMenu.Add(new LeftMainMenuItem("Personal_ChangeAvatar", "Đổi Avatar", @"/Profile/ChangeAvatar",null));
            menus.Add(personal);

            LeftMainMenuItem friendShip = new LeftMainMenuItem("FriendShip", "Bạn bè", @"/Friend/MyFriend/", new List<LeftMainMenuItem>());
            friendShip.SubMenu.Add(new LeftMainMenuItem("FriendShip_MyFriend", "Danh sách bạn bè", @"/Friend/MyFriend/",null));
            friendShip.SubMenu.Add(new LeftMainMenuItem("FriendShip_FriendRequest", "Chờ kết bạn", @"/Friend/FriendRequest", null));
            friendShip.SubMenu.Add(new LeftMainMenuItem("FriendShip_Search", "Tìm kiếm bạn", @"/Friend/Search", null));
            menus.Add(friendShip);

            LeftMainMenuItem courseList = new LeftMainMenuItem("Courses", "Học tập", "#", new List<LeftMainMenuItem>());
            courseList.SubMenu.Add(new LeftMainMenuItem("Courses_MyCourses", "Lớp bạn quản lý", "#",null));
            courseList.SubMenu.Add(new LeftMainMenuItem("Courses_Attendance", "Lớp bạn tham gia", "#", null));
            courseList.SubMenu.Add(new LeftMainMenuItem("Courses_Search", "Tìm lớp học", "#", null));
            menus.Add(courseList);

            return menus;    

        }


    }
}